#include <reg52.h>

sbit led0 = P0^0;
sbit led1 = P0^1;
sbit led2 = P0^2;
sbit led3 = P0^3;

void main()
{
	unsigned char cnt=0;
	unsigned int i=0;
	led0=0;
	led1=1;
	led2=1;
	led3=0;
	P0=0xFE;
	while(1)
	{
		P0 = ~(0x01 << cnt);
		for(i=0;i<30000;i++);
		cnt++;
		if(cnt>=8)
		{
			cnt=0;
		}
	}
}